<?php
namespace app\common\validate;
use think\validate;

class CategoryValidate extends validate {
	protected $rule = [
		['name', 'require|unique:category', '请填写分类名称|分类名称已经存在'],
		['pid', 'require|number', '请选择父类|非法提效数据'],
	];

	protected $scene = [
		'edit' => ['name' => 'require', 'pid'],
	];

}